package com.example.testspringes.testfan;

import com.example.testspringes.modul.Person;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Description: //TODO
 * @ProjectName: testspringes
 * @Package: com.example.testspringes.testfan
 * @Author: FX
 * @CreateDate: 2019/3/26 16:44
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
public class Test {
    public static final Logger LOGGER = LoggerFactory.getLogger(Test.class);
    public static void main(String[] args) {
        List<Person> collection = new ArrayList();
        collection.add(new Person("张三", 22, "男","1"));
        collection.add(new Person("李四", 19, "女","1"));
        collection.add(new Person("王五", 34, "男","1"));
        collection.add(new Person("赵六", 30, "男","1"));
        collection.add(new Person("田七", 25, "女","1"));
        List<Person> collect = collection.stream().filter(c->c.getAge()>30).collect(Collectors.toList());
        System.out.println(collect);


        Thread thread1 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        });
        thread1.start();
        Thread thread2=new Thread(()-> System.out.println(Thread.currentThread().getName()));
        thread2.start();
        Thread1 thread11 = new Thread1();
        thread11.start();
        String format = DateFormatUtils.format(System.currentTimeMillis(), "yyyy-MM-dd HH:mm:ss");
        System.out.println(format);


    }
}
